//<![CDATA[
      /* begin Page */

/* Generated with Artisteer version 2.4.0.24559, file checksum is [[[!CHECKSUM!]]]. */

var socialsEventHelper = {
	'bind': function(obj, evt, fn) {
		if (obj.addEventListener)
			obj.addEventListener(evt, fn, false);
		else if (obj.attachEvent)
			obj.attachEvent('on' + evt, fn);
		else
			obj['on' + evt] = fn;
	}
};

var socialsUserAgent = navigator.userAgent.toLowerCase();

var socialsBrowser = {
	version: (socialsUserAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/) || [])[1],
	safari: /webkit/.test(socialsUserAgent) && !/chrome/.test(socialsUserAgent),
	chrome: /chrome/.test(socialsUserAgent),
	opera: /opera/.test(socialsUserAgent),
	msie: /msie/.test(socialsUserAgent) && !/opera/.test(socialsUserAgent),
	mozilla: /mozilla/.test(socialsUserAgent) && !/(compatible|webkit)/.test(socialsUserAgent)
};
 
socialsCssHelper = function() {
    var is = function(t) { return (socialsUserAgent.indexOf(t) != -1) };
    var el = document.getElementsByTagName('html')[0];
    var val = [(!(/opera|webtv/i.test(socialsUserAgent)) && /msie (\d)/.test(socialsUserAgent)) ? ('ie ie' + RegExp.$1)
    : is('firefox/2') ? 'gecko firefox2'
    : is('firefox/3') ? 'gecko firefox3'
    : is('gecko/') ? 'gecko'
    : is('chrome/') ? 'chrome'
    : is('opera/9') ? 'opera opera9' : /opera (\d)/.test(socialsUserAgent) ? 'opera opera' + RegExp.$1
    : is('konqueror') ? 'konqueror'
    : is('applewebkit/') ? 'webkit safari'
    : is('mozilla/') ? 'gecko' : '',
    (is('x11') || is('linux')) ? ' linux'
    : is('mac') ? ' mac'
    : is('win') ? ' win' : ''
    ].join(' ');
    if (!el.className) {
     el.className = val;
    } else {
     var newCl = el.className;
     newCl += (' ' + val);
     el.className = newCl;
    }
} ();

(function() {
    // fix ie blinking
    var m = document.uniqueID && document.compatMode && !window.XMLHttpRequest && document.execCommand;
    try { if (!!m) { m('BackgroundImageCache', false, true); } }
    catch (oh) { };
})();

var socialsLoadEvent = (function() {
	var list = [];

	var done = false;
	var ready = function() {
		if (done) return;
		done = true;
		for (var i = 0; i < list.length; i++)
			list[i]();
	};

	if (document.addEventListener && !socialsBrowser.opera)
		document.addEventListener('DOMContentLoaded', ready, false);

	if (socialsBrowser.msie && window == top) {
		(function() {
			try {
				document.documentElement.doScroll('left');
			} catch (e) {
				setTimeout(arguments.callee, 10);
				return;
			}
			ready();
		})();
	}

	if (socialsBrowser.opera) {
		document.addEventListener('DOMContentLoaded', function() {
			for (var i = 0; i < document.styleSheets.length; i++) {
				if (document.styleSheets[i].disabled) {
					setTimeout(arguments.callee, 10);
					return;
				}
			}
			ready();
		}, false);
	}

	if (socialsBrowser.safari || socialsBrowser.chrome) {
		var numStyles;
		(function() {
			if (document.readyState != 'loaded' && document.readyState != 'complete') {
				setTimeout(arguments.callee, 10);
				return;
			}
			if ('undefined' == typeof numStyles) {
				numStyles = document.getElementsByTagName('style').length;
				var links = document.getElementsByTagName('link');
				for (var i = 0; i < links.length; i++) {
					numStyles += (links[i].getAttribute('rel') == 'stylesheet') ? 1 : 0;
				}
				if (document.styleSheets.length != numStyles) {
					setTimeout(arguments.callee, 0);
					return;
				}
			}
			ready();
		})();
	}
	socialsEventHelper.bind(window, 'load', ready);
	return ({
		add: function(f) {
			list.push(f);
		}
	})
})();


function socialsGetElementsByClassName(clsName, parentEle, tagName) {
	var elements = null;
	var found = [];
	var s = String.fromCharCode(92);
	var re = new RegExp('(?:^|' + s + 's+)' + clsName + '(?:$|' + s + 's+)');
	if (!parentEle) parentEle = document;
	if (!tagName) tagName = '*';
	elements = parentEle.getElementsByTagName(tagName);
	if (elements) {
		for (var i = 0; i < elements.length; ++i) {
			if (elements[i].className.search(re) != -1) {
				found[found.length] = elements[i];
			}
		}
	}
	return found;
}

var _socialsStyleUrlCached = null;
function socialsGetStyleUrl() {
    if (null == _socialsStyleUrlCached) {
        var ns;
        _socialsStyleUrlCached = '';
        ns = document.getElementsByTagName('link');
        for (var i = 0; i < ns.length; i++) {
            var l = ns[i];
            if (l.href && /style\.ie6\.css(\?.*)?$/.test(l.href)) {
                return _socialsStyleUrlCached = l.href.replace(/style\.ie6\.css(\?.*)?$/, '');
            }
        }

        ns = document.getElementsByTagName('style');
        for (var i = 0; i < ns.length; i++) {
            var matches = new RegExp('import\\s+"([^"]+\\/)style\\.ie6\\.css"').exec(ns[i].innerHTML);
            if (null != matches && matches.length > 0)
                return _socialsStyleUrlCached = matches[1];
        }
    }
    return _socialsStyleUrlCached;
}

function socialsFixPNG(element) {
	if (socialsBrowser.msie && socialsBrowser.version < 7) {
		var src;
		if (element.tagName == 'IMG') {
			if (/\.png$/.test(element.src)) {
				src = element.src;
				element.src = socialsGetStyleUrl() + 'http://lh6.ggpht.com/_YSALBRM0ouw/S6h2UVRYorI/AAAAAAAAA5c/fMhCmr17R3o/s320/spacer.gif';
			}
		}
		else {
			src = element.currentStyle.backgroundImage.match(/url\("(.+\.png)"\)/i);
			if (src) {
				src = src[1];
				element.runtimeStyle.backgroundImage = 'none';
			}
		}
		if (src) element.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "')";
	}
}

function socialsHasClass(el, cls) {
	return (el && el.className && (' ' + el.className + ' ').indexOf(' ' + cls + ' ') != -1);
}
/* end Page */

/* begin Menu */
function socialsGTranslateFix() {
	var menus = socialsGetElementsByClassName("socials-menu", document, "ul");
	for (var i = 0; i < menus.length; i++) {
		var menu = menus[i];
		var childs = menu.childNodes;
		var listItems = [];
		for (var j = 0; j < childs.length; j++) {
			var el = childs[j];
			if (String(el.tagName).toLowerCase() == "li") listItems.push(el);
		}
		for (var j = 0; j < listItems.length; j++) {
			var item = listItems[j];
			var a = null;
			var gspan = null;
			for (var p = 0; p < item.childNodes.length; p++) {
				var l = item.childNodes[p];
				if (!(l && l.tagName)) continue;
				if (String(l.tagName).toLowerCase() == "a") a = l;
				if (String(l.tagName).toLowerCase() == "span") gspan = l;
			}
			if (gspan && a) {
				var t = null;
				for (var k = 0; k < gspan.childNodes.length; k++) {
					var e = gspan.childNodes[k];
					if (!(e && e.tagName)) continue;
					if (String(e.tagName).toLowerCase() == "a" && e.firstChild) e = e.firstChild;
					if (e && e.className && e.className == 't') {
						t = e;
						if (t.firstChild && t.firstChild.tagName && String(t.firstChild.tagName).toLowerCase() == "a") {
							while (t.firstChild.firstChild) t.appendChild(t.firstChild.firstChild);
							t.removeChild(t.firstChild);
						}
						a.appendChild(t);
						break;
					}
				}
				gspan.parentNode.removeChild(gspan);
			}
		}
	}
}
socialsLoadEvent.add(socialsGTranslateFix);

function socialsAddMenuSeparators() {
	var menus = socialsGetElementsByClassName("socials-menu", document, "ul");
	for (var i = 0; i < menus.length; i++) {
		var menu = menus[i];
		var childs = menu.childNodes;
		var listItems = [];
		for (var j = 0; j < childs.length; j++) {
			var el = childs[j];
			if (String(el.tagName).toLowerCase() == "li") listItems.push(el);
		}
		for (var j = 0; j < listItems.length - 1; j++) {
			var item = listItems[j];
			var span = document.createElement('span');
			span.className = 'socials-menu-separator';
			var li = document.createElement('li');
			li.appendChild(span);
			item.parentNode.insertBefore(li, item.nextSibling);
		}
	}
}
socialsLoadEvent.add(socialsAddMenuSeparators);

function socialsMenuIE6Setup() {
	var isIE6 = navigator.userAgent.toLowerCase().indexOf("msie") != -1
    && navigator.userAgent.toLowerCase().indexOf("msie 7") == -1;
	if (!isIE6) return;
	var aTmp2, i, j, oLI, aUL, aA;
	var aTmp = socialsGetElementsByClassName("socials-menu", document, "ul");
	for (i = 0; i < aTmp.length; i++) {
		aTmp2 = aTmp[i].getElementsByTagName("li");
		for (j = 0; j < aTmp2.length; j++) {
			oLI = aTmp2[j];
			aUL = oLI.getElementsByTagName("ul");
			if (aUL && aUL.length) {
				oLI.UL = aUL[0];
				aA = oLI.getElementsByTagName("a");
				if (aA && aA.length)
					oLI.A = aA[0];
				oLI.onmouseenter = function() {
					this.className += " socials-menuhover";
					this.UL.className += " socials-menuhoverUL";
					if (this.A) this.A.className += " socials-menuhoverA";
				};
				oLI.onmouseleave = function() {
					this.className = this.className.replace(/socials-menuhover/, "");
					this.UL.className = this.UL.className.replace(/socials-menuhoverUL/, "");
					if (this.A) this.A.className = this.A.className.replace(/socials-menuhoverA/, "");
				};
			}
		}
	}
}
socialsLoadEvent.add(socialsMenuIE6Setup);
/* end Menu */

/* begin Layout */
function socialsLayoutIESetup() {
    var isIE = navigator.userAgent.toLowerCase().indexOf("msie") != -1;
    if (!isIE) return;
    var q = socialsGetElementsByClassName("socials-content-layout", document, "div");
    if (!q || !q.length) return;
    for (var i = 0; i < q.length; i++) {
        var l = q[i];
        var l_childs = l.childNodes;
        var r = null;
        for (var p = 0; p < l_childs.length; p++) {
            var l_ch = l_childs[p];
            if ((String(l_ch.tagName).toLowerCase() == "div") && socialsHasClass(l_ch, "socials-content-layout-row")) {
                r = l_ch;
                break;
            }
        }
        if (!r) continue;
        var c = [];
        var r_childs = r.childNodes;
        for (var o = 0; o < r_childs.length; o++) {
            var r_ch = r_childs[o];
            if ((String(r_ch.tagName).toLowerCase() == "div") && socialsHasClass(r_ch, "socials-layout-cell")) {
                c.push(r_ch);
            }
        }
        if (!c || !c.length) continue;
        var table = document.createElement("table");
        table.className = l.className;
        var row = table.insertRow(-1);
        table.className = l.className;
        for (var j = 0; j < c.length; j++) {
            var cell = row.insertCell(-1);
            var s = c[j];
            cell.className = s.className;
            while (s.firstChild) {
                cell.appendChild(s.firstChild);
            }
        }
        l.parentNode.insertBefore(table, l);
        l.parentNode.removeChild(l);
    }
}
socialsLoadEvent.add(socialsLayoutIESetup);
/* end Layout */

/* begin Button */

function socialsButtonsSetupJsHover(className) {
	var tags = ["input", "a", "button"];
	for (var j = 0; j < tags.length; j++){
		var buttons = socialsGetElementsByClassName(className, document, tags[j]);
		for (var i = 0; i < buttons.length; i++) {
			var button = buttons[i];
			if (!button.tagName || !button.parentNode) return;
			if (!socialsHasClass(button.parentNode, 'socials-button-wrapper')) {
				if (!socialsHasClass(button, 'socials-button')) button.className += ' socials-button';
				var wrapper = document.createElement('span');
				wrapper.className = "socials-button-wrapper";
				if (socialsHasClass(button, 'active')) wrapper.className += ' active';
				var spanL = document.createElement('span');
				spanL.className = "l";
				spanL.innerHTML = " ";
				wrapper.appendChild(spanL);
				var spanR = document.createElement('span');
				spanR.className = "r";
				spanR.innerHTML = " ";
				wrapper.appendChild(spanR);
				button.parentNode.insertBefore(wrapper, button);
				wrapper.appendChild(button);
			}
			socialsEventHelper.bind(button, 'mouseover', function(e) {
				e = e || window.event;
				wrapper = (e.target || e.srcElement).parentNode;
				wrapper.className += " hover";
			});
			socialsEventHelper.bind(button, 'mouseout', function(e) {
				e = e || window.event;
				button = e.target || e.srcElement;
				wrapper = button.parentNode;
				wrapper.className = wrapper.className.replace(/hover/, "");
				if (!socialsHasClass(button, 'active')) wrapper.className = wrapper.className.replace(/active/, "");
			});
			socialsEventHelper.bind(button, 'mousedown', function(e) {
				e = e || window.event;
				button = e.target || e.srcElement;
				wrapper = button.parentNode;
				if (!socialsHasClass(button, 'active')) wrapper.className += " active";
			});
			socialsEventHelper.bind(button, 'mouseup', function(e) {
				e = e || window.event;
				button = e.target || e.srcElement;
				wrapper = button.parentNode;
				if (!socialsHasClass(button, 'active')) wrapper.className = wrapper.className.replace(/active/, "");
			});
		}
	}
}

socialsLoadEvent.add(function() { socialsButtonsSetupJsHover("socials-button"); });
/* end Button */

/* begin VMenu */
function socialsAddVMenuSeparators() {
    var create_VSeparator = function(sub, first) {
        var cls = 'socials-v' + (sub ? "sub" : "") + 'menu-separator';
        var li = document.createElement('li');
        li.className = (first ? (cls + " " + cls + " socials-vmenu-separator-first") : cls);
        var span = document.createElement('span');
        span.className = cls+'-span';
        li.appendChild(span);
        return li;
    };
	var menus = socialsGetElementsByClassName("socials-vmenublock", document, "div");
	for (var k = 0; k < menus.length; k++) {
		var uls = menus[k].getElementsByTagName("ul");
		for (var i = 0; i < uls.length; i++) {
			var ul = uls[i];
			var childs = ul.childNodes;
			var listItems = [];
			for (var y = 0; y < childs.length; y++) {
				var el = childs[y];
				if (String(el.tagName).toLowerCase() == "li") listItems.push(el);
            }
    		for (var j = 0; j < listItems.length; j++) {
			    var item = listItems[j];
			    if ((item.parentNode.getElementsByTagName("li")[0] == item) && (item.parentNode != uls[0]))
			        item.parentNode.insertBefore(create_VSeparator(item.parentNode.parentNode.parentNode != uls[0], true), item);
			    if (j < listItems.length - 1)
			        item.parentNode.insertBefore(create_VSeparator(item.parentNode != uls[0], false), item.nextSibling);
			}
		}
	}
}
socialsLoadEvent.add(socialsAddVMenuSeparators);

/* end VMenu */

/* begin VMenuItem */
function socialsVMenu() {
	var menus = socialsGetElementsByClassName("socials-vmenu", document, "ul");
	for (var k = 0; k < menus.length; k++) {
		var vmenu = menus[k];
		vmenu.items = vmenu.getElementsByTagName("li");
		vmenu.uls = vmenu.getElementsByTagName("ul");
		vmenu.alinks = vmenu.getElementsByTagName("a");
		for (var i = 0; i < vmenu.items.length; i++) {
			var li = vmenu.items[i];
			li.vmenu = vmenu;
			for (var s = 0; s < li.childNodes.length; s++) {
				var a = li.childNodes[s];
				if (!(a && a.tagName)) continue;
				if (String(a.tagName).toLowerCase() == "a") li.a = a;
				if (String(a.tagName).toLowerCase() == "ul") li.ul = a;
				if (li.a) li.a.onclick = function() {

				    if (this.href.replace('#', '') == window.location.href.replace('#', '')) {

				        var li = this.parentNode;

				        var items = li.vmenu.items;
				        for (var r = 0; r < items.length; r++) items[r].className = items[r].className.replace(/active/, "").replace("  ", " ");

				        var uls = li.vmenu.uls;
				        for (var x = 0; x < uls.length; x++) uls[x].className = uls[x].className.replace(/active/, "").replace("  ", " ");

				        var alinks = li.vmenu.alinks;
				        for (var y = 0; y < alinks.length; y++) alinks[y].className = alinks[y].className.replace(/active/, "").replace("  ", " ");

				        if (li.ul) li.ul.className += " active";

				        var parent = li;
				        while (parent && parent != li.vmenu) {
				            parent.className += " active";
				            if (parent.a) parent.a.className += " active";
				            parent = parent.parentNode;
				        }
				        return false;
				    }
				}
			}
			
		}
	}
}
socialsLoadEvent.add(socialsVMenu);



/* end VMenuItem */



function socialsInsertSidebarBlocks(widgetClassName) {
    var widgets = socialsGetElementsByClassName(widgetClassName, document, "div");
    for (var i = 0; i < widgets.length; i++) {
        var widget = widgets[i];
        if (widget.id == 'LinkList99')    continue;
        if (widget.id == 'LinkList98')    continue;
        if (widget.id == 'LinkList97')    continue;
        if (widget.id == 'Text99')        continue;
        if (widget.id == 'BlogArchive99') continue;
        
        var childs = widget.childNodes;
        var widgetTitle = widget.getElementsByTagName("h2");
        var widgetContent = widget.innerHTML;
        var widgetTitleText = '';
        if (widgetTitle.length != 0){
            widgetTitleText = widgetTitle[0].innerHTML;
        }

        var div1  = document.createElement('div'); div1.className  = 'socials-block';
        
                        
        var div2  = document.createElement('div'); div2.className  = 'socials-block-tl'; div1.appendChild(div2);
        var div3  = document.createElement('div'); div3.className  = 'socials-block-tr'; div1.appendChild(div3);
        var div4  = document.createElement('div'); div4.className  = 'socials-block-bl'; div1.appendChild(div4);
        var div5  = document.createElement('div'); div5.className  = 'socials-block-br'; div1.appendChild(div5);
        var div6  = document.createElement('div'); div6.className  = 'socials-block-tc'; div1.appendChild(div6);
        var div7  = document.createElement('div'); div7.className  = 'socials-block-bc'; div1.appendChild(div7);
        var div8  = document.createElement('div'); div8.className  = 'socials-block-cl'; div1.appendChild(div8);
        
                        
        var div9  = document.createElement('div'); div9.className  = 'socials-block-cr'; div1.appendChild(div9);
        var div10 = document.createElement('div'); div10.className = 'socials-block-cc'; div1.appendChild(div10);
        
                        
        var divBB   = document.createElement('div'); divBB.className = 'socials-block-body';  div1.appendChild(divBB);
        if (widgetTitleText && true){
            var divBH   = document.createElement('div'); divBH.className = 'socials-blockheader'; divBB.appendChild(divBH);
                        var divBHl  = document.createElement('div'); divBHl.className = 'l'; divBH.appendChild(divBHl);
            var divBHr  = document.createElement('div'); divBHr.className = 'r'; divBH.appendChild(divBHr);
                        var divBHt  = document.createElement('div'); divBHt.className = 't'; divBH.appendChild(divBHt);
            divBHt.innerHTML = widgetTitleText;
        }

        var divBC   = document.createElement('div'); divBC.className = 'socials-blockcontent'; divBB.appendChild(divBC);
        
                        
        var di2  = document.createElement('div'); di2.className  = 'socials-blockcontent-tl'; divBC.appendChild(di2);
        var di3  = document.createElement('div'); di3.className  = 'socials-blockcontent-tr'; divBC.appendChild(di3);
        var di4  = document.createElement('div'); di4.className  = 'socials-blockcontent-bl'; divBC.appendChild(di4);
        var di5  = document.createElement('div'); di5.className  = 'socials-blockcontent-br'; divBC.appendChild(di5);
        var di6  = document.createElement('div'); di6.className  = 'socials-blockcontent-tc'; divBC.appendChild(di6);
        var di7  = document.createElement('div'); di7.className  = 'socials-blockcontent-bc'; divBC.appendChild(di7);
        var di8  = document.createElement('div'); di8.className  = 'socials-blockcontent-cl'; divBC.appendChild(di8);
        
                        
        var di9  = document.createElement('div'); di9.className  = 'socials-blockcontent-cr'; divBC.appendChild(di9);
        var di10 = document.createElement('div'); di10.className = 'socials-blockcontent-cc'; divBC.appendChild(di10);
        
                        
        var divBCb  = document.createElement('div'); divBCb.className = 'socials-blockcontent-body'; divBC.appendChild(divBCb);
        
        
        
        if ( ((widgetClassName == 'widget Gadget') || (widgetClassName == 'widget Followers')) && (widgetContent.indexOf("friendconnect.js") != -1)){
            
            if (socialsBrowser.mozilla){
                if (widgetTitle.length != 0){
                    widgetTitle[0].parentNode.removeChild(widgetTitle[0]);
                }
                divBCb.innerHTML = widget.innerHTML;
                widget.innerHTML = "";
                widget.appendChild(div1);
            }
            if (socialsBrowser.msie){
                if (widgetTitle.length != 0){
                    widgetTitle[0].parentNode.removeChild(widgetTitle[0]);
                }
                var childsLength = childs.length;
                for (var j = 0; j < childsLength; j++) {
                    divBCb.appendChild(childs[0]);
                }
                widget.appendChild(div1);
            }
            
        } else {
            if (widgetTitle.length != 0){
                widgetTitle[0].parentNode.removeChild(widgetTitle[0]);
            }
            var childsLength = childs.length;
            for (var j = 0; j < childsLength; j++) {
                divBCb.appendChild(childs[0]);
            }
            widget.appendChild(div1);
        }
  
        
        if (widgetClassName == 'widget Subscribe') {
            widget.style.position = "relative";
            widget.style.zIndex = "2";
        }
        
    }
}

function socialsCheckNavBar(bodyBgPosition){
    var navbar = document.getElementById("navbar");
    if (navbar){
        if (false) {
            var el1 = document.getElementById("socials-page-background-glare");
            if (el1) el1.style.top = "30px";
            var el2 = document.getElementById("socials-page-background-simple-gradient");
            if (el2) el2.style.top = "30px";
            if (!el2) {
                var el3 = document.getElementById("socials-page-background-gradient");
                if (el3) el3.style.top = "30px";
            }
            if ((bodyBgPosition.length > 0) && (bodyBgPosition.indexOf("top")>-1)){
                var bodyEl = document.getElementsByTagName("body")[0];
                bodyEl.style.backgroundPosition = bodyBgPosition.replace("top ", "") + " 30px";
            }
        } else {
            navbar.style.display = 'none';
        }
    }
}

function socialsFixFooterMenu(){
    var widgetLinks = document.getElementById("LinkList98");
    var widgetText  = document.getElementById("Text99");
    if (widgetLinks) {
        var widgetText = widgetLinks.innerHTML;
        widgetLinks.innerHTML = widgetText.replace("| |", "");
    } else {
        if (widgetText){
            var els = socialsGetElementsByClassName("widget-content", widgetText, "div");
            var el = els[0];
            if (el.innerHTML == '\n') {
                el.innerHTML = "<br /><br />";
            } else {
                el.innerHTML += "<br />";
            }
        }
    }
}

function socialsFixPostHeaders(){
    var els = socialsGetElementsByClassName("socials-postmetadataheader", document, "div");
    for (var i = 0; i < els.length; i++) {
        var el = els[i];
        if (el) {
            var elText = el.innerHTML;
            if ((el.getElementsByTagName("div").length == 0) && (el.getElementsByTagName("h2").length == 0)) el.style.visibility = 'hidden';
        }
    }
}

socialsLoadEvent.add(function() { socialsFixPostHeaders(); });

function socialsFixPostFooters(){
    var els = socialsGetElementsByClassName("socials-postmetadatafooter", document, "div");
    for (var i = 0; i < els.length; i++) {
        var el = els[i];
        if (el) {
            var els2 = socialsGetElementsByClassName("socials-postfootericons", el, "div");
            for (var j = 0; j < els2.length; j++) {
                var el2 = els2[j];
                var elText = el2.innerHTML;
                if ((el.getElementsByTagName("img").length == 0) && (el.getElementsByTagName("a").length == 0)) el.style.visibility = 'hidden';
            }
        }
    }
}

socialsLoadEvent.add(function() { socialsFixPostFooters(); });

function socialsFixTopMenu(){
    var topMenu = document.getElementById("LinkList99");
    if (!topMenu){
        var navSection = document.getElementById("navsection");
        if (navSection){
            if (showHomePage) {
                if (window.location == homePageLink) 
                    var tmpstr = '<a href="'+homePageLink+'" class="active">';
                else
                    var tmpstr = '<a href="'+homePageLink+'">';
                navSection.innerHTML = '<div><div class="l"></div><div class="r"></div><div class="socials-nav-center"><ul class="socials-menu"><li>'+tmpstr+'<span class="l"></span><span class="r"></span><span class="t">'+homePageName+'</span></a></li></ul></div></div>';
            } else {
                navSection.innerHTML = '<div><div class="l"></div><div class="r"></div><div class="socials-nav-center"></div></div>';
            }
        }
    }
}
socialsLoadEvent.add(function() { socialsFixTopMenu(); });

function socialsDisplayTopMenu(menuitems) {

    var i = 0;
    var subList = false;
    var subList2 = false;
    var subList3 = false;

    for (i=0; i < menuitems.length; i++) {
      var item = menuitems[i];
      var itemname = item[0];
      var itemlink = item[1];
      
      if (  ((itemname.charAt(2) == "-") && !subList3)
         || ((itemname.charAt(1) == "-") && !subList2)
         || ((itemname.charAt(0) == "-") && !subList )) 
      {
        document.write('<ul>');
      } else if (  ((itemname.charAt(2) != "-") && subList3)
	            || ((itemname.charAt(1) != "-") && subList2)
                || ((itemname.charAt(0) != "-") && subList ))
      {

        if ( (itemname.charAt(2) != "-") && subList3) {
          document.write("</li></ul>");
          subList3 = false;
        }

        if ( (itemname.charAt(1) != "-") && subList2) {
          document.write("</li></ul>");
          subList2 = false;
        }

        if ( (itemname.charAt(0) != "-") && subList) {
          document.write("</li></ul>");
          subList = false;
        }

        document.write("</li>");

      } else if (i != 0) {
        document.write("</li>");
      }
      
      document.write("<li>");

      if (itemname.charAt(0) != "-") {
        if (window.location == itemlink) {
          document.write('<a href="'+itemlink+'" class="active"><span class="l"></span><span class="r"></span><span class="t">'+itemname+'</span></a>');

        } else if(itemlink == "http://./") {
          document.write('<a href="#"><span class="l"></span><span class="r"></span><span class="t">'+itemname+'</span></a>');

        } else {
          document.write('<a href="'+itemlink+'"><span class="l"></span><span class="r"></span><span class="t">'+itemname+'</span></a>');
        }

      } else {

        if (itemname.charAt(2) == "-") {
          document.write('<a href="'+itemlink+'">'+itemname.substr(3,itemname.length)+'</a>'); 
          subList = true;
          subList2 = true;
          subList3 = true;

        } else if (itemname.charAt(1) == "-") {
          document.write('<a href="'+itemlink+'">'+itemname.substr(2,itemname.length)+'</a>');
          subList = true;
          subList2 = true;

        } else {
          document.write('<a href="'+itemlink+'">'+itemname.substr(1,itemname.length)+'</a>');
          subList = true;
        }
      }

      if (i == (menuitems.length-1)) {
        if (subList3)
          document.write("</li></ul>");
           
        if (subList2)
          document.write("</li></ul>");

        if (subList)
          document.write("</li></ul>");

        document.write("</li>");
      }
    }
}


function socialsDisplayVMenu(vmenuitems) {

    var i = 0;
    var subList = false;
    var subList2 = false;
    var subList3 = false;

    for (i=0; i < vmenuitems.length; i++) {
      var item = vmenuitems[i];
      var itemname = item[0];
      var itemlink = item[1];
      
      if (  ((itemname.charAt(2) == "-") && !subList3)
         || ((itemname.charAt(1) == "-") && !subList2)
         || ((itemname.charAt(0) == "-") && !subList )) 
      {
        document.write('<ul>');
      } else if (  ((itemname.charAt(2) != "-") && subList3)
	            || ((itemname.charAt(1) != "-") && subList2)
                || ((itemname.charAt(0) != "-") && subList ))
      {

        if ( (itemname.charAt(2) != "-") && subList3) {
          document.write("</li></ul>");
          subList3 = false;
        }

        if ( (itemname.charAt(1) != "-") && subList2) {
          document.write("</li></ul>");
          subList2 = false;
        }

        if ( (itemname.charAt(0) != "-") && subList) {
          document.write("</li></ul>");
          subList = false;
        }

        document.write("</li>");

      } else if (i != 0) {
        document.write("</li>");
      }
      
      document.write("<li>");

      if(itemlink == "http://./") itemlink = '#';
      
      if (itemname.charAt(0) != "-") {
        if (window.location == itemlink) {
          document.write('<a href="'+itemlink+'" class="active active-vmenu"><span class="l"></span><span class="r"></span><span class="t">'+itemname+'</span></a>');
        } else {
          document.write('<a href="'+itemlink+'"><span class="l"></span><span class="r"></span><span class="t">'+itemname+'</span></a>');
        }

      } else {

        if (itemname.charAt(2) == "-") {
          if (window.location == itemlink) {
            document.write('<a href="'+itemlink+'" class="active active-vmenu">'+itemname.substr(3,itemname.length)+'</a>'); 
          } else {
            document.write('<a href="'+itemlink+'">'+itemname.substr(3,itemname.length)+'</a>'); 
          }
          subList = true;
          subList2 = true;
          subList3 = true;

        } else if (itemname.charAt(1) == "-") {
          if (window.location == itemlink) {
            document.write('<a href="'+itemlink+'" class="active active-vmenu">'+itemname.substr(2,itemname.length)+'</a>');
          } else {
            document.write('<a href="'+itemlink+'">'+itemname.substr(2,itemname.length)+'</a>');
          }
          subList = true;
          subList2 = true;

        } else {
          if (window.location == itemlink) {
            document.write('<a href="'+itemlink+'" class="active active-vmenu">'+itemname.substr(1,itemname.length)+'</a>');
          } else {
            document.write('<a href="'+itemlink+'">'+itemname.substr(1,itemname.length)+'</a>');
          }
          subList = true;
        }
      }

      if (i == (vmenuitems.length-1)) {
        if (subList3)
          document.write("</li></ul>");
           
        if (subList2)
          document.write("</li></ul>");

        if (subList)
          document.write("</li></ul>");

        document.write("</li>");
      }
    }
    
    if (!true){
        var vmenu_header = document.getElementById("socials-vmenu-header");
        if (vmenu_header) vmenu_header.style.display = 'none';
    }
    
    var vmenu = document.getElementById("socials-vmenu");
    if (vmenu){
        var vmenu_active_links = socialsGetElementsByClassName("active active-vmenu", vmenu, "a");
        for (var i = 0; i < vmenu_active_links.length; i++) {
            var vmenu_active_link = vmenu_active_links[i];
            do {
                var vmenu_active_li = vmenu_active_link.parentNode;
                if (vmenu_active_li && vmenu_active_li.nodeName == 'LI'){
                    vmenu_active_li.className = "active active-vmenu";
                    var vmenu_active_ul = vmenu_active_li.parentNode;
                    if (vmenu_active_ul && vmenu_active_ul.nodeName == 'UL'){
                        if (vmenu_active_ul.className == 'socials-vmenu') break;
                        vmenu_active_ul.className = "active active-vmenu";
                        vmenu_active_link = vmenu_active_ul;
                        do vmenu_active_link = vmenu_active_link.previousSibling;
                        while (vmenu_active_link && vmenu_active_link.nodeType != 1);
                        if (vmenu_active_link && vmenu_active_link.nodeName == 'A') vmenu_active_link.className = "active active-vmenu";
                    }
                }
            } while (vmenu_active_link && vmenu_active_link.nodeName == 'A');
        }
    }
    
}


function socialsFixVMenuArchive(){
    var vmenuarch = document.getElementById("socials-vmenu-archive");
    if (vmenuarch){
        if (!true){
            var vmenu_header = document.getElementById("socials-vmenu-header");
            if (vmenu_header) vmenu_header.style.display = 'none';
        }
        var alinks = vmenuarch.getElementsByTagName("a");
        for (var i = 0; i < alinks.length; i++) {
            var alink = alinks[i];
            if (alink.href.replace('#', '') == window.location.href.replace('#', '')) {
                alink.className += " active active-vmenu";
                var vmenu_ul = alink;
                do vmenu_ul = vmenu_ul.nextSibling;
                while (vmenu_ul && vmenu_ul.nodeType != 1 && vmenu_ul.nodeName != 'UL');
                if (vmenu_ul) vmenu_ul.className += " active active-vmenu";
            }
        }
        var vmenu_active_links = socialsGetElementsByClassName("active active-vmenu", vmenuarch, "a");
        for (var i = 0; i < vmenu_active_links.length; i++) {
            var vmenu_active_link = vmenu_active_links[i];
            do {
                var vmenu_active_li = vmenu_active_link.parentNode;
                if (vmenu_active_li && vmenu_active_li.nodeName == 'LI'){
                    vmenu_active_li.className = "active active-vmenu";
                    var vmenu_active_ul = vmenu_active_li.parentNode;
                    if (vmenu_active_ul && vmenu_active_ul.nodeName == 'UL'){
                        if (vmenu_active_ul.className == 'socials-vmenu') break;
                        vmenu_active_ul.className = "active active-vmenu";
                        vmenu_active_link = vmenu_active_ul;
                        do vmenu_active_link = vmenu_active_link.previousSibling;
                        while (vmenu_active_link && vmenu_active_link.nodeType != 1);
                        if (vmenu_active_link && vmenu_active_link.nodeName == 'A') vmenu_active_link.className = "active active-vmenu";
                    }
                }
            } while (vmenu_active_link && vmenu_active_link.nodeName == 'A');
        }
    }
}

      //]]>
